﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 前台单据主表
    /// </summary>
    public partial class corecmsfoodordermaster
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderId", IsPrimaryKey = true)]
        public Int64 orderId { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderNo", IsNullable = true)]
        public String orderNo { get; set; }

        /// <summary>
        /// 取单号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "number", IsNullable = true)]
        public String number { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderDate")]
        public DateTime orderDate { get; set; }

        /// <summary>
        /// 门店id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "storeId")]
        public long storeId { get; set; }

        /// <summary>
        /// 总店ID 
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "corpId")]
        public Int32 corpId { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "person")]
        public Int32 person { get; set; }

        /// <summary>
        /// 班次Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "classId", IsNullable = true)]
        public Int64 classId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumQuantity")]
        public decimal sumQuantity { get; set; }

        /// <summary>
        /// 单据应收金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAmount")]
        public decimal sumAmount { get; set; }

        /// <summary>
        /// 单据实收金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumRealAmount")]
        public decimal sumRealAmount { get; set; }

        /// <summary>
        /// 做法金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumTaskAmount")]
        public Decimal sumTaskAmount { get; set; }

        /// <summary>
        /// 加料金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFeedAmount")]
        public Decimal sumFeedAmount { get; set; }

        /// <summary>
        /// 减免金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFreeAmount")]
        public decimal sumFreeAmount { get; set; }

        /// <summary>
        /// 单据优惠金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumReduceAmount")]
        public decimal sumReduceAmount { get; set; }

        /// <summary>
        /// 赠送金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumPresentAmount")]
        public Decimal sumPresentAmount { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumDiscountAmount")]
        public Decimal sumDiscountAmount { get; set; }

        /// <summary>
        /// 抹零金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFloorAmount")]
        public Decimal sumFloorAmount { get; set; }

        /// <summary>
        /// 小计（未抹零和减免前 ）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAllAmount1")]
        public Decimal sumAllAmount1 { get; set; }

        /// <summary>
        /// 小计（抹零和减免后 ）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAllAmount")]
        public Decimal sumAllAmount { get; set; }

        /// <summary>
        /// 找零金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "changeAmount")]
        public Decimal changeAmount { get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "telephone", IsNullable = true)]
        public String telephone { get; set; }

        /// <summary>
        ///  订单类型(GlobalEnumVars.OrderBillType,销售订单 = 1,按单退货 = 2,);
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "ordertype")]
        public Int32 ordertype { get; set; }

        /// <summary>
        /// 桌号id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "deskId")]
        public Int64 deskId { get; set; }

        /// <summary>
        /// 会员ID 
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userId", IsNullable = true)]
        public Int64? userId { get; set; }

        /// <summary>
        ///本单积分	
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userPoint", IsNullable = true)]
        public Int32 userPoint { get; set; }

        /// <summary>
        /// 支付状态(0 未付款1 已支付)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "payStatus")]
        public Int32 payStatus { get; set; }

        /// <summary>
        /// 订单状态(0 未付款1 已支付2 已配送4 取消订单5 订单退货6 货到付款7 订单超时9 已收货10 已确认收货)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "status")]
        public Int32 status { get; set; }

        /// <summary>
        ///操作员Id	
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sysUserId", IsNullable = true)]
        public long sysUserId { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "createTime")]
        public DateTime createTime { get; set; }

        /// <summary>
        /// 是否上传
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "isUpload", IsNullable = true)]
        public Boolean? isUpload { get; set; }

        /// <summary>
        /// 订单来源(0 前台订单1 小程序订单，2美团外卖订单)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sourceType")]
        public Int32 sourceType { get; set; } = 0;

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnDescription = "修改时间")]
        public System.Int64 modifyTime { get; set; } = 0;

        /// <summary>
        /// 源序号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sourceId", IsNullable = true)]
        public Int64 sourceId { get; set; }

        /// <summary>
        /// 原订单号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sourceNo", IsNullable = true)]
        public String sourceNo { get; set; }

        /// <summary>
        ///上次剩余积分	
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userOldPoint", IsNullable = true)]
        public Int32 userOldPoint { get; set; }

        /// <summary>
        /// 上次剩余金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userOldBalance")]
        public Decimal userOldBalance { get; set; }

        /// <summary>
        ///消费后剩余积分	
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userNewPoint", IsNullable = true)]
        public Int32 userNewPoint { get; set; }

        /// <summary>
        /// 消费后剩余金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userNewBalance")]
        public Decimal userNewBalance { get; set; }
    }
}